<template>
	<view>
		<view class="cash-out-detail">
			<view class="cash-out-money">
				{{ (info.source==1?info.realBenTotalAmt:info.realAssure) || 0}}
			</view>
			<view class="font-s-14 fw-500 text-c" style="margin-bottom: 80rpx;">
				还款金额 (元)
			</view>
			<view class="flex-between-center" v-if="info.source==1">
				<view class="">本期应还总额：</view>
				<view class="color-red font-s-16 fw-b">¥{{ info.realBenTotalAmt || 0}}</view>
			</view>
			<view class="cash-out-step" v-if="info.source==1">
				<view class="flex-between-center">
					<view class="color-666">含本金金额</view>
					<view class="">¥{{ info.realPrincipal || 0}}</view>
				</view>
				<view class="flex-between-center mar-t-15">
					<view class="color-666">含利息金额</view>
					<view class="">¥{{ info.realInterest || 0}}</view>
				</view>
				<view class="flex-between-center mar-t-15" v-if="info.realFine">
					<view class="color-666">含滞纳金</view>
					<view class="">¥{{ info.realFine || 0}}</view>
				</view>
			</view>
			<view class="cash-out-content" v-if="info.source==1">
				<view class="cash-out-item">
					<view class="color-666">
						交易单号
					</view>
					<view class="fw-500">
						<text v-if="[1,2].includes(info.benRepayType)">{{ info.benOrderSn || '-'}}</text>
						<text v-else-if="[3,4,6,7].includes(info.benRepayType)">{{ info.benRepayOrderNo || '-'}}</text>
						<text v-else-if="[5].includes(info.benRepayType)">{{ info.orderNo || '-'}}</text>
						<text v-else>-</text>
					</view>
				</view>
				<view class="cash-out-item">
					<view class="color-666">
						还款时间
					</view>
					<view class="fw-500">
						<text v-if="[1,2].includes(info.benRepayType)">{{ info.benPaySucessTime || '-'}}</text>
						<text v-else-if="[3,4,5,6,7].includes(info.benRepayType)">{{ info.benRepayPaySucessTime || '-'}}</text>
						<text v-else>-</text>
					</view>
				</view>
				<view class="cash-out-item">
					<view class="color-666">
						还款状态
					</view>
					<view class="fw-500 color-green">还款成功</view>
				</view>
				<view class="cash-out-item" v-if="[1,2].includes(info.benRepayType)">
					<view class="color-666">
						还款卡号
					</view>
					<view class="fw-500">
						{{info.bankName}}（{{info.bankCard}}）
					</view>
				</view>
				<view class="cash-out-item" v-if="[1,2].includes(info.benRepayType)">
					<view class="color-666">
						代扣商户号
					</view>
					<view class="fw-500">
						{{info.daiBenShangNo || '-'}}
					</view>
				</view>
				<!-- <view class="cash-out-item" v-if="[1,2].includes(info.benRepayType)">
					<view class="color-666">
						代扣账号
					</view>
					<view class="fw-500">
						{{info.daiBenZhangNo || '-'}}
					</view>
				</view> -->
				<view class="cash-out-item" v-if="[5].includes(info.benRepayType)">
					<view class="color-666">
						还款备注
					</view>
					<view class="fw-500">
						{{info.offlineRemark || '-'}}
					</view>
				</view>
				<view class="cash-out-item">
					<view class="color-666">
						还款方式
					</view>
					<view class="fw-500">
						<text v-if="[1,2].includes(info.benRepayType)">代扣还款</text>
						<text v-else-if="[3,4].includes(info.benRepayType)">微信主动还款</text>
						<text v-else-if="[5].includes(info.benRepayType)">线下打款</text>
						<text v-else-if="[6,7].includes(info.benRepayType)">支付宝主动还款</text>
						<text v-else>-</text>
					</view>
				</view>
			</view>
			<view class="cash-out-content" v-if="info.source==2">
				<view class="cash-out-item">
					<view class="color-666">
						交易单号
					</view>
					<view class="fw-500">
						<text v-if="[1,2].includes(info.assureRepayType)">{{ info.assureOrderSn || '-'}}</text>
						<text v-else-if="[3,4,6,7].includes(info.assureRepayType)">{{ info.assureRepayOrderNo || '-'}}</text>
						<text v-else-if="[5].includes(info.assureRepayType)">{{ info.orderNo || '-'}}</text>
						<text v-else>-</text>
					</view>
				</view>
				<view class="cash-out-item">
					<view class="color-666">
						还款时间
					</view>
					<view class="fw-500">
						<text v-if="[1,2].includes(info.assureRepayType)">{{ info.assurePaySucessTime || '-'}}</text>
						<text v-else-if="[3,4,5,6,7].includes(info.assureRepayType)">{{ info.assureRepayPaySucessTime || '-'}}</text>
						<text v-else>-</text>
					</view>
				</view>
				<view class="cash-out-item">
					<view class="color-666">
						还款状态
					</view>
					<view class="fw-500 color-green">还款成功</view>
				</view>
				<view class="cash-out-item" v-if="[1,2].includes(info.assureRepayType)">
					<view class="color-666">
						还款卡号
					</view>
					<view class="fw-500">
						{{info.bankName}}（{{info.bankCard}}）
					</view>
				</view>
				<view class="cash-out-item" v-if="[1,2].includes(info.assureRepayType)">
					<view class="color-666">
						代扣商户号
					</view>
					<view class="fw-500">
						{{info.daiAssureShangNo || '-'}}
					</view>
				</view>
				<!-- <view class="cash-out-item" v-if="[1,2].includes(info.assureRepayType)">
					<view class="color-666">
						代扣账号
					</view>
					<view class="fw-500">
						{{info.daiAssureZhangNo || '-'}}
					</view>
				</view> -->
				<view class="cash-out-item" v-if="[5].includes(info.assureRepayType)">
					<view class="color-666">
						还款备注
					</view>
					<view class="fw-500">
						{{info.offlineRemark || '-'}}
					</view>
				</view>
				<view class="cash-out-item">
					<view class="color-666">
						还款方式
					</view>
					<view class="fw-500">
						<text v-if="[1,2].includes(info.assureRepayType)">代扣还款</text>
						<text v-else-if="[3,4].includes(info.assureRepayType)">微信主动还款</text>
						<text v-else-if="[5].includes(info.assureRepayType)">线下打款</text>
						<text v-else-if="[6,7].includes(info.assureRepayType)">支付宝主动还款</text>
						<text v-else>-</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info: uni.getStorageSync('billDetailInfo') || {}
			}
		},
		onLoad() {
			
		},
		methods: {
			
		}
	}
</script>

<style>
	page{
		background: #fff;
	}
</style>
<style lang="scss" scoped>
	.cash-out-detail{
		padding: 80rpx 24rpx;
		.cash-out-money{
			font-size: 52rpx;
			font-weight: bold;
			color: #FF3341;
			text-align: center;
			margin-bottom: 16rpx;
		}
		.cash-out-step{
			width: 100%;
			border-radius: 8rpx;
			background: #FAFAFA;
			margin-top: 24rpx;
			padding: 32rpx 24rpx;
		}
		.cash-out-content{
			margin: 32rpx 0;
			.cash-out-item{
				display: flex;
				align-items: center;
				justify-content: space-between;
				margin-top: 48rpx;
			}
		}
	}
</style>
